import request from '@/utils/request'

// 创建技师
export function createTechnician(data) {
  return request({
    url: '/mini/technician/create',
    method: 'post',
    data: data
  })
}

// 更新技师
export function updateTechnician(data) {
  return request({
    url: '/mini/technician/update',
    method: 'put',
    data: data
  })
}

// 删除技师
export function deleteTechnician(id) {
  return request({
    url: '/mini/technician/delete?id=' + id,
    method: 'delete'
  })
}

// 获得技师
export function getTechnician(id) {
  return request({
    url: '/mini/technician/get?id=' + id,
    method: 'get'
  })
}

// 获得技师分页
export function getTechnicianPage(query) {
  return request({
    url: '/mini/technician/page',
    method: 'get',
    params: query
  })
}

// 导出技师 Excel
export function exportTechnicianExcel(query) {
  return request({
    url: '/mini/technician/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
